package dlally.model;

import junit.framework.TestCase;

public class testEdge extends TestCase {
	
	Edge edge1;
	Edge edge2;
	Edge edge3;
	Edge edge4;
	Edge edge5;

	protected void setUp() throws Exception {
		super.setUp();
		edge1 = new Edge(0,1,10);
		edge2 = new Edge(1,1,10);
		edge3 = new Edge(0,0,10);
		edge4 = new Edge(0,1,20);
		edge5 = new Edge(0,1,10);
	}

	protected void tearDown() throws Exception {
		super.tearDown();
	}
	
	public void testEquals(){
		assertEquals(edge1, edge5);
		assertFalse(edge1.equals(edge2));
		assertFalse(edge1.equals(edge3));
		assertFalse(edge1.equals(edge4));
		assertFalse(edge1.equals(null));
		assertFalse(edge1.equals(5));	
	}
	
	public void testGet(){
		assertEquals(edge1.getHeight(), 10);
		assertEquals(edge1.getLeft(),0);
		assertEquals(edge1.getRight(),1);
	}

}
